<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="box">
franbkk
</div>
<script>
    var box = document.getElementById('box');
    //
    //可读，可写


    box.innerHTML = '<h1>tom</h1>';//可写，可以被赋值,
    var a = box.innerHTML;//可读
    console.log(a);

//innerHTML 可以解析 html标签
//innerText 不可以解析 html标签


    box.innerText = '<h1>tom</h1>'
    var b = box.innerText;
    console.log(b)

</script>
</body>
</html>